<?php
// Carico dati della segnalazione
$rid = JRequest::getVar( 'rid');
if($rid) {
	$query = "SELECT * FROM #__fap_soci WHERE rid='$rid'";
	$database->setQuery( $query );
	$data = $database->loadAssoc();
	if($data) { 
	?>

						<fieldset>
							<input type="hidden" value="<?php echo $data["id"] ?>" name="id"/>
							<input type="hidden" value="1" name="confirmed"/>
							<input type="hidden" name="name" id="name" value="<?php echo isset($data["name"]) ? $data["name"] : "" ?>"/>
							<input type="hidden" name="surname" id="surname" value="<?php echo isset($data["surname"]) ? $data["surname"] : "" ?>"/>
							<input type="hidden" name="placeofborn" id="placeofborn" value="<?php echo isset($data["placeofborn"]) ? $data["placeofborn"] : "" ?>"/>
							<input type="hidden" name="dateofborn" id="dateofborn" value="<?php echo isset($data["dateofborn"]) ? $data["dateofborn"] : "" ?>"/>
							<input type="hidden" name="email" id="email" value="<?php echo isset($data["email"]) ? $data["email"] : "" ?>"/>
							<input type="hidden" name="phone" id="phone" value="<?php echo isset($data["phone"]) ? $data["phone"] : "" ?>"/>
							<input type="hidden" name="address" id="address" value="<?php echo isset($data["address"]) ? $data["address"] : "" ?>"/>
							<input type="hidden" name="zip" id="zip" value="<?php echo isset($data["zip"]) ? $data["zip"] : "" ?>"/>
							<input type="hidden" name="city" id="city" value="<?php echo isset($data["city"]) ? $data["city"] : "" ?>"/>
							<input type="hidden" name="parentname" id="parentname" value="<?php echo isset($data["parentname"]) ? $data["parentname"] : "" ?>"/>
							<input type="hidden" name="parentsurname" id="parentsurname" value="<?php echo isset($data["parentsurname"]) ? $data["parentsurname"] : "" ?>"/>
							<input type="hidden" name="parentplaceofborn" id="parentplaceofborn" value="<?php echo isset($data["parentplaceofborn"]) ? $data["parentplaceofborn"] : "" ?>"/>
							<input type="hidden" name="parentdateofborn" id="parentdateofborn" value="<?php echo isset($data["parentdateofborn"]) ? $data["parentdateofborn"] : "" ?>"/>
							<input type="hidden" name="inviteby" id="inviteby" value="<?php echo isset($data["inviteby"]) ? $data["inviteby"] : "" ?>"/>
							<input type="hidden" name="username" id="username" value="<?php echo isset($data["username"]) ? $data["username"] : "" ?>"/>
							<input type="hidden" name="type" id="type-amico" value="<?php echo isset($data["type"]) ? $data["type"] : "" ?>"/> 


							<p>
								<button type="submit" class="confirm">conferma iscrizione</button>
							</p>
														
						</fieldset>
	<?php
	} else {
		echo JText::_('ALERTNOTAUTH');
	}
	
} else {
	echo JText::_('ALERTNOTAUTH');
}
?>